package job

import (
	"gitee.com/gcom/stockdock/core/support"
	"time"
)

const (
	JobRunOk   = "succeed"
	JobRunFail = "fail"
	JobRunNone = "new"
)

type Job struct {
	support.SimpleEntity
	Name       string
	LastRun    time.Time
	LastStatus string
	RunCount   int
}

func (Job) TableName() string {
	return "job"
}

type JobHist struct {
	support.SimpleEntity
	JobId      int64
	TraceId    uint64
	Name       string
	From       string
	Status     string
	ErrorMsg   string
	StartedAt  time.Time
	FinishedAt time.Time
}

func (JobHist) TableName() string {
	return "job_hist"
}
